package jsyf.oa.entity.psi;

import com.alibaba.fastjson.JSONObject;

import javax.persistence.Entity;
import javax.persistence.Table;

import jsyf.oa.ientity.BaseEntity;

import java.util.Date;

/**
 * Created by Maqiuqiu on 2018/10/20.
 */
@Entity
@Table(name = "t_psi_purchase", schema = "oa", catalog = "")
public class PurchaseManiEntity extends BaseEntity {

    private String applyDate;
    private String companyId;
    private String companyName;
    private String departId;
    private String departName;
    private String receiveDate;
    private String purpose;
    private String state;
    private String auditFlag;
    private String currentAuditorId;
    private String currentAuditorName;
    private String copierReturnReason;
    private String createUserId;
    private String createUserName;
    private String method;
    private String buyerUserId;
    private String buyerUserName;
    private String buyerDate;
    private String buyerAttachName;
    private String buyerAttachUrl;
    private String inRepoDate;
    private String inUserId;
    private String inUserName;

    public String getApplyDate() {
        return applyDate;
    }

    public void setApplyDate(String applyDate) {
        this.applyDate = applyDate;
    }

    public String getCompanyId() {
        return companyId;
    }

    public void setCompanyId(String companyId) {
        this.companyId = companyId;
    }

    public String getCompanyName() {
        return companyName;
    }

    public void setCompanyName(String companyName) {
        this.companyName = companyName;
    }

    public String getDepartId() {
        return departId;
    }

    public void setDepartId(String departId) {
        this.departId = departId;
    }

    public String getDepartName() {
        return departName;
    }

    public void setDepartName(String departName) {
        this.departName = departName;
    }

    public String getReceiveDate() {
        return receiveDate;
    }

    public void setReceiveDate(String receiveDate) {
        this.receiveDate = receiveDate;
    }

    public String getPurpose() {
        return purpose;
    }

    public void setPurpose(String purpose) {
        this.purpose = purpose;
    }

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    public String getAuditFlag() {
        return auditFlag;
    }

    public void setAuditFlag(String auditFlag) {
        this.auditFlag = auditFlag;
    }

    public String getCurrentAuditorId() {
        return currentAuditorId;
    }

    public void setCurrentAuditorId(String currentAuditorId) {
        this.currentAuditorId = currentAuditorId;
    }

    public String getCurrentAuditorName() {
        return currentAuditorName;
    }

    public void setCurrentAuditorName(String currentAuditorName) {
        this.currentAuditorName = currentAuditorName;
    }

    public String getCopierReturnReason() {
        return copierReturnReason;
    }

    public void setCopierReturnReason(String copierReturnReason) {
        this.copierReturnReason = copierReturnReason;
    }

    public String getCreateUserId() {
        return createUserId;
    }

    public void setCreateUserId(String createUserId) {
        this.createUserId = createUserId;
    }

    public String getCreateUserName() {
        return createUserName;
    }

    public void setCreateUserName(String createUserName) {
        this.createUserName = createUserName;
    }

    public String getMethod() {
        return method;
    }

    public void setMethod(String method) {
        this.method = method;
    }

    public String getBuyerUserId() {
        return buyerUserId;
    }

    public void setBuyerUserId(String buyerUserId) {
        this.buyerUserId = buyerUserId;
    }

    public String getBuyerUserName() {
        return buyerUserName;
    }

    public void setBuyerUserName(String buyerUserName) {
        this.buyerUserName = buyerUserName;
    }

    public String getBuyerDate() {
        return buyerDate;
    }

    public void setBuyerDate(String buyerDate) {
        this.buyerDate = buyerDate;
    }

    public String getBuyerAttachName() {
        return buyerAttachName;
    }

    public void setBuyerAttachName(String buyerAttachName) {
        this.buyerAttachName = buyerAttachName;
    }

    public String getBuyerAttachUrl() {
        return buyerAttachUrl;
    }

    public void setBuyerAttachUrl(String buyerAttachUrl) {
        this.buyerAttachUrl = buyerAttachUrl;
    }

    public String getInRepoDate() {
        return inRepoDate;
    }

    public void setInRepoDate(String inRepoDate) {
        this.inRepoDate = inRepoDate;
    }

    public String getInUserId() {
        return inUserId;
    }

    public void setInUserId(String inUserId) {
        this.inUserId = inUserId;
    }

    public String getInUserName() {
        return inUserName;
    }

    public void setInUserName(String inUserName) {
        this.inUserName = inUserName;
    }

    @Override
    public JSONObject getJSONObject() {
        JSONObject obj = new JSONObject();
        obj.put("ID", getId());
        obj.put("APPLY_DATE", getApplyDate());
        obj.put("COMPANY_ID", getCompanyId());
        obj.put("COMPANY_NAME", getCompanyName());
        obj.put("DEPART_ID", getDepartId());
        obj.put("DEPART_NAME", getDepartName());
        obj.put("RECEIVE_DATE", getReceiveDate());
        obj.put("PURPOSE", getPurpose());
        obj.put("STATE", getState());
        obj.put("AUDIT_FLAG", getAuditFlag());
        obj.put("CURRENT_AUDITOR_ID", getCurrentAuditorId());
        obj.put("CURRENT_AUDITOR_NAME", getCurrentAuditorName());
        obj.put("COPIER_RETURN_REASON", getCopierReturnReason());
        obj.put("CREATE_USER_ID", getCreateUserId());
        obj.put("CREATE_TIME", getCreateTime());
        obj.put("UPDATE_USER_ID", getUpdateUserId());
        obj.put("UPDATE_TIME", getUpdateTime());
        obj.put("CREATE_USER_NAME", getCreateUserName());
        obj.put("METHOD", getMethod());
        obj.put("BUYER_USER_ID",getBuyerUserId());
        obj.put("BUYER_USER_NAME",getBuyerUserName());
        obj.put("BUYER_DATE",getBuyerDate());
        obj.put("BUYER_ATTACH_NAME",getBuyerAttachName());
        obj.put("BUYER_ATTACH_URL",getBuyerAttachUrl());
        obj.put("IN_REPO_DATE",getInRepoDate());
        obj.put("IN_USER_ID",getInUserId());
        obj.put("IN_USER_NAME",getInUserName());
        return obj;
    }

    @Override
    public String getTableName() {
        return "t_psi_purchase";
    }

    @Override
    public JSONObject getJSONColumns() {
        JSONObject obj = new JSONObject();
        obj.put("ID", "id");
        obj.put("APPLY_DATE", "applyDate");
        obj.put("COMPANY_ID", "companyId");
        obj.put("COMPANY_NAME", "companyName");
        obj.put("DEPART_ID", "departId");
        obj.put("DEPART_NAME", "departName");
        obj.put("RECEIVE_DATE", "receiveDate");
        obj.put("PURPOSE", "purpose");
        obj.put("STATE", "state");
        obj.put("AUDIT_FLAG", "auditFlag");
        obj.put("CURRENT_AUDITOR_ID", "currentAuditorId");
        obj.put("CURRENT_AUDITOR_NAME", "currentAuditorName");
        obj.put("COPIER_RETURN_REASON", "copierReturnReason");
        obj.put("CREATE_USER_ID", "createUserId");
        obj.put("CREATE_TIME", "createTime");
        obj.put("UPDATE_USER_ID", "updateUserId");
        obj.put("UPDATE_TIME", "updateTime");
        obj.put("CREATE_USER_NAME", "createUserName");
        obj.put("METHOD", "method");
        obj.put("BUYER_USER_ID","buyerUserId");
        obj.put("BUYER_USER_NAME","buyerUserName");
        obj.put("BUYER_DATE","buyerDate");
        obj.put("BUYER_ATTACH_NAME","buyerAttachName");
        obj.put("BUYER_ATTACH_URL","buyerAttachUrl");
        obj.put("IN_REPO_DATE","inRepoDate");
        obj.put("IN_USER_ID","inUserId");
        obj.put("IN_USER_NAME","inUserName");
        return obj;
    }

}
